{% extends "director/index.html" %}
{% load static %}
{% load jsonify %}

{% block page_content %}

<script type="text/javascript">
    change_password_url='{% url "change_password" %}'

    name1 = ex.map(heads,function(head){
        return head.name
    })
    heads2=[
        {name:'first_pswd',type:'password',label:'新密码'},
        {name:'second_pswd',type:'password',label:'确认输入'}]
    heads= heads.concat(heads2)

    $(function () {
        new Vue({
            el:'#there',
            data:{
              name1 :name1,
                name2:['first_pswd','second_pswd']
            },
            mixins:[field_fun],
            methods:{
                change_pswd_link:function(){
                    return change_password_url+ex.searchfy({uid:this.kw.row.pk,next:encodeURIComponent(location.href)},'?')
                }
            }

        })
    })
</script>

<div id='there'>

    <div v-if="can_log" style='float: right;padding: 5px 20px;'>
        <a :href="log_url()">History</a>
    </div>
    <path-nav :menu='menu'>
        <li><span>编辑</span></li>
    </path-nav>


    <com-form-btn :submit="submit" :del_row="del_row" :cancel="cancel" :form_bus="this"></com-form-btn>

    <!--<div style="padding: 0px 20px;">-->
        <!--<a :href="change_pswd_link()">修改用户密码</a>-->
    <!--</div>-->


    <div class='field-panel'>

        <field  v-for='name in name1' :key="name" :name='name' :kw='kw'></field>
    </div>
    <div class='field-panel'>

        <field  v-for='name in name2' :key="name" :name='name' :kw='kw'></field>
    </div>

</div>

{% endblock %}